<template>
  <el-card class="page-tools">
    <el-row type="flex" justify="space-between" align="middle">
      <el-col :span="14">
        <div v-if="showBefore" class="before">
          <!-- 定义前面得插槽 -->
          <slot name="before" />
        </div>
      </el-col>
      <el-col :span="10">
        <el-row type="flex" justify="end">
          <!-- 定义后面的插槽 -->
          <slot name="after" />
        </el-row>
      </el-col>
    </el-row>
  </el-card>
</template>

<script>
export default {
  name: 'PageTools',
  props: {
    showBefore: {
      type: Boolean,
      default: true
    }

  }

}
</script>

<style lang='scss'>
 .page-tools {
    margin: 10px 0;
    padding:0px 10px;
    .before {
      // line-height: 34px;

    display: inline-block;
    border-radius: 3px;
    // border: 1px solid rgba(145, 213, 255, 1);
    // background: rgba(230, 247, 255, 1);
  }
 }

.el-card__body{
  padding:0px;
}
</style>
